﻿@model RTW.OA.Models.meeting_room

@{
    ViewBag.Title = "会议室明细页";
    Layout = "~/Views/Shared/_LayoutBase.cshtml";
}

<div id="dMain">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox" style="margin-bottom: 0px;">
            <div class="ibox-title">
                <h4>@ViewBag.Title </h4>
            </div>
            <div class="ibox-content">
                <div class="col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="from-content">
                                <dl>
                                    <dt>会议室名称：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.MR_NAME)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>可容纳人数：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.MR_CAPACITY)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>设备情况：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.MR_DEVICE)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>会议室描述：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.MR_DESC)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>地址：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.MR_PLACE)
                                    </dd>
                                </dl>
                                @*<dl>
                                    <dt>申请部门：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.TO_ID)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>申请人员：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.SECRET_TO_ID)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>允许申请的星期设置：</dt>
                                    <dd>
                                        @Html.DisplayTextFor(m => m.APPLY_WEEKDAYS)
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>是否支持视频会议：</dt>
                                    <dd>
                                        @{
                                            if (Model.VIDEO_TYPE)
                                            {<span>是</span> }
                                            else
                                            {<span>否</span> }
                                        }
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>会议管理查看权限：</dt>
                                    <dd>
                                        @{
                                            if (Model.QUERY_PRIV_FLAG)
                                            {<span>是</span> }
                                            else
                                            {<span>否</span> }
                                        }
                                    </dd>
                                </dl>*@
                                @*<dl>
                                        <dt>会议室图片：</dt>
                                        <dd>
                                            <a href="@Model.MR_IMAGE">@Model.MR_IMAGE</a>
                                        </dd>
                                    </dl>*@

                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-8">
                    <div id="your-pano"></div>
                </div>
                <img src="@Model.MR_IMAGE" style="display:none;" />
            </div>
        </div>
    </div>
</div>
@section scripts{
    <script src="@Url.Content("~/Content/js/common/PhotoSphereViewer/three.min.js")"></script>
    <script src="@Url.Content("~/Content/js/common/PhotoSphereViewer/photo-sphere-viewer.min.js")"></script>
    <script type="text/javascript">
        $(function () {
            //if (window.FileReader) {
            //    var fr = new FileReader();
            //    // add your code here  
            //}
            //else {
            //    alert("Not supported by your browser!");
            //}

            var file = '@Model.MR_IMAGE';
            //var reader = new FileReader();

            //reader.onload = function () {
               var PSV = new PhotoSphereViewer({
                    // Panorama, given in base 64
                   panorama: file,

                    // Container
                    container: 'your-pano',

                    // Deactivate the animation
                    time_anim: false,

                    // Display the navigation bar
                    navbar: true,

                    // Resize the panorama
                    size: {
                        width: '100%',
                        height: '500px'
                    },

                    // No XMP data
                    usexmpdata: false
                });
        //    };

        //    reader.readAsDataURL(file);
        })
    </script>
}